package com.egg.mall.model.response.web;

import com.egg.common.core.model.response.BaseResponse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;


@Data
@ApiModel(value = "SPU分页")
public class SpuPage extends BaseResponse {


    @ApiModelProperty(value = "SPU ID")
    private Long id;

    @ApiModelProperty(value = "分类ID")
    private Long categoryId;

    @ApiModelProperty(value = "分类名称")
    private String categoryName;

    @ApiModelProperty(value = "品牌ID")
    private Long brandId;

    @ApiModelProperty(value = "品牌名称")
    private String brandName;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "原价格(单位:分)")
    private Long originPrice;

    @ApiModelProperty(value = "现价格(单位:分)")
    private Long price;

    @ApiModelProperty(value = "销售量")
    private Integer sales;

    @ApiModelProperty(value = "图片地址")
    private String picUrl;

    @ApiModelProperty(value = "图册")
    private List<String> album;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "简介")
    private String description;

    @ApiModelProperty(value = "详情")
    private String detail;

    @ApiModelProperty(value = "状态")
    private Boolean state;

    @ApiModelProperty(value = "SKU集合")
    private List<Sku> skuList;

    @Data
    @ApiModel(value = "SpuPage.SKU")
    public static class Sku {


        @ApiModelProperty(value = "SKU ID")
        private Long id;

        @ApiModelProperty(value = "SKU编码")
        private String code;

        @ApiModelProperty(value = "SPU ID")
        private Long spuId;

        @ApiModelProperty(value = "SKU名称")
        private String name;

        @ApiModelProperty(value = "SKU价格(单位:分)")
        private Long price;

        @ApiModelProperty(value = "SKU库存数量")
        private Integer stockQuantity;

        @ApiModelProperty(value = "SKU图片地址")
        private String picUrl;

        @ApiModelProperty(value = "规格值, 以英文逗号(,)分割")
        private String specIds;


    }


}
